﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class shopping3 : System.Web.UI.Page
{
    public string orderId="";
    public string productname="";
    public string pwd="";
    public string msg="";
    protected void Page_Load(object sender, EventArgs e)
    {   
        if(!IsPostBack)
        {
            var ordernumber = Request["orderId"];
            pay.BLL.OrderBLL orderbll = new pay.BLL.OrderBLL();

            if (ordernumber != null && Request["productname"] != null && Session["pwd"] != null && Session["msg"]!=null)
            {
                ordernumber = ordernumber.Split(',')[0];
                pay.Entity.Web_Order orders = orderbll.GetOrderByOrderNumber(ordernumber);
                orderId = ordernumber;
                productname =Server.UrlDecode(Request["productname"].ToString());
                pwd = Session["pwd"].ToString();
                msg = Session["msg"].ToString();

            }//完成了支付
            else
            {
                
                //if (Session["uname"] == null || Session["tel"]==null)
                //{
                //    Response.Write("<script>alert('用户姓名或联系电话不能为空!'); this.history.back(-1);</script>");
                //    return;
                //}
                //orderId = "GH" + DateTime.Now.ToString("yyyyMMddHHmmssFFF");
                //if (Request["productname"] != null)
                //{
                //    productname = Request["productname"].ToString();
                //    productname = Server.UrlDecode(productname);
                //}
                Response.Write("<script>alert('对不起，改订单尚未完成付款！');window.location.href='shopping22.aspx'; window.opener = null;window.close();</script>");


            }//未完成支付


         
           
            
        }
        
    }
    



}